<?php
/**
 * REIG Front Page
 *
 * @author Anggiajuang Patria <http://anggiaj.web.id/> 
 */

require_once 'config.php';
require_once 'functions.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta http-equiv="Expires" content="Mon, 26 Jul 1997 05:00:00 GMT" />
	<meta http-equiv="Pragma" content="no-cache" />
	<meta name="Author" content="anggiaj" />
	<meta name="keywords" content="email, spam, protect, email image, image, spambot, at, email, mail, safe, mail, email address image, email image, email address image, email image, protect email address, protect email address, protect mail address" />
	<meta name="Description" content="REIG stands for REIG Email Image Generator is a free tool that will convert any email address into an image. Instead of actual text you'll have an image with your email address inside of it. This way spambots can't read your email address." />
	<link rel="stylesheet" media="screen" type="text/css" href="css/style.css" />
	<link rel="stylesheet" media="screen" type="text/css" href="css/colorpicker.css" />
	<script type="text/javascript" src="js/jquery-1.2.6.js" charset="utf-8"></script>
	<script type="text/javascript" src="js/jquery.idTabs.min.js" charset="utf-8"></script>	
	<script type="text/javascript" src="js/jquery.selectchain.js" charset="utf-8"></script>	
	<script type="text/javascript" src="js/jquery.form.js" charset="utf-8"></script>	
	<script type="text/javascript" src="js/colorpicker.js" charset="utf-8"></script>
	<title>Email Image Generator | REIG</title>
</head>
<body>
<noscript>Please enable Javascript to view this page correctly.</noscript>
<div id="abs"><a href="http://reig-email-image-generator.googlecode.com/" title="Download Source Code"><span id="download">Download</span></a></div>
<div id="usual1" class="usual"> 
	<ul id="menu"> 
		<li><a class="selected" href="#tab1">Standard</a></li> 
		<li><a href="#tab2">Custom</a></li> 
		<li><a href="#tab3">READ ME</a></li>
	</ul> 
	<div id="tab1">
		<h1>Standard Mode</h1>
		<div id="standard_result"></div>
		<form action="process.php" method="post" id="standard_form">
			<input type="hidden" name="generate" value="standard" />
			<p><label for="username">Enter your email address <span class="tips">[ username | host | extension ]</span>:</label><br />
				<input type="text" size="25" name="username" id="username" /> @ 
				<select name="domain" id="domain">
				<?php
					foreach ($EMAIL_HOST as $key => $value) {
						echo '<option value="'.$key.'">'.$value['label'].'</option>';
					}
				?>
				</select>
				<select name="ext" id="ext">
					<option value="null">&nbsp;</option>
				</select>
				<input type="submit" value="Generate" />
			</p>
		</form>
		<p class="tips"><b>Note</b>: REIG are not in any way affiliated with any mail providers. You should generate your correct email accounts.</p>
	</div> 
	<div id="tab2" style="display:none">
		<h1>Custom Mode</h1>
		<div id="custom_result"></div>
		<form action="process.php" method="post" id="custom_form">
			<input type="hidden" name="generate" value="custom" />
			<p><label for="email">Enter your email address: </label><br /><input type="text" size="35" name="email" id="email" /></p>
			<p><label for="font">Font <span class="tips">[ family | size | color ]</span>:</label> <br />
				<select name="font_family" id="font">
				<?php
					foreach ($FONT_FAMILY as $key => $value) {
						echo '<option value="'.$key.'">'.$value.'</option>';
					}
				?>
				</select>
				<select name="font_size">
				<?php
					$font_size_len = count($FONT_SIZE);
					for ($i = 0; $i < $font_size_len; $i++) {
						echo '<option value="'.$FONT_SIZE[$i].'">'.$FONT_SIZE[$i].'</option>';
					}
				?>
				</select>
				# <input type="text" size="5" name="color" id="color" value="38b547" /><br />
				<label for="background">Background color:</label> <br /># <input type="text" size="5" name="background" id="background" value="d4353d" /><br />
				</p>
				
			<input type="submit" value="Generate" />
		</form>
	</div> 
	<div id="tab3" style="display:none">
		<h1>Read Me</h1>
		<iframe src="readme.html" frameborder="0" height="400" width="100%" scrolling="auto"></iframe>
	</div>
</div> 

<p id="ft"><span class="tips" id="hits"><?=display_hits()?></span><br /><b>R E I G</b> v 0.0.1 &copy; <a href="http://anggiaj.web.id/" title="Visit author blog">anggiaj</a> 2008. <a href="http://anggiaj.web.id/2008/11/reig-email-image-generator/" title="Discuss">Discuss</a> |<!-- Contact Form --> <a href="http://anggiaj.web.id/kontak/" title="Feedback">Feedback</a></p>
<script type="text/javascript"> 
<!--
	// AJAX Form
	$('#custom_form').submit(function() {
		$(this).ajaxSubmit({
			dataType: 'json',
			success: function(data, responseCode) {
				if ($('#message')) $('#message').remove();
				$('<div id="message" class="'+data.class+'">').hide().html(data.text).prependTo("#custom_result").fadeIn(2500);
				if ($('#hits')) $('#hits').remove(); 
				$('<span class="tips" id="hits">').html(data.hits).prependTo('#ft');
			}
		});
		return false;
	});
	
	$('#standard_form').submit(function() {
		$(this).ajaxSubmit({
			dataType: 'json',
			success: function(data, responseCode) {
				if ($('#message')) $('#message').remove();
				$('<div id="message" class="'+data.class+'">').hide().html(data.text).prependTo("#standard_result").fadeIn(2500);
				if ($('#hits')) $('#hits').remove(); 
				$('<span class="tips" id="hits">').html(data.hits).prependTo('#ft');
			}
		});
		return false;
	});
	
	// Tabbs
	$("#usual1 ul").idTabs(); 
	
	// Color Picker
	$('#color').ColorPicker({
		onSubmit: function(hsb, hex, rgb) {$('#color').val(hex);},
		onBeforeShow: function () {$(this).ColorPickerSetColor(this.value);}
	}).bind('keyup', function(){$(this).ColorPickerSetColor(this.value);});
	
	$('#background').ColorPicker({
		onSubmit: function(hsb, hex, rgb) {$('#background').val(hex);},
		onBeforeShow: function () {$(this).ColorPickerSetColor(this.value);}
	}).bind('keyup', function(){$(this).ColorPickerSetColor(this.value);});
	
	// Chain select
	$(function () {
        $('#domain').selectChain({target: $('#ext'),url: 'process.php',type: 'post',data: "ajax=true"})
		.trigger('change');
    });
-->
</script>
</body>
</html>